package cn.cloud.mqtt2redis.configuration.mysql;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

@Data
@Entity
@IdClass(cn.cloud.mqtt2redis.configuration.mysql.IdClass.class)
public class progMapEntity {
    //自增ID
    @Id
    @Column(name="device_id")
    private String device;
    @Id
    @Column(name="prog_name")
    private String name;

    @Column(name="prog_id")
    private String id;
    @Column(name="hdfs_path")
    private String path;
    @Column(name="modify_time")
    private String time;

    public String getDevice(){
        return device;
    }

    public void setDevice(String device){
        this.device = device;
    }

    public String getName(){
        return name;
    }

    public void setName(String name){
        this.name = name;
    }

    public String getId(){
        return id;
    }

    public void setId(String id){
        this.id = id;
    }

    public String getPath(){
        return path;
    }

    public void setPath(String path){
        this.path = path;
    }

    public String getTime() {  return time;  }

    public void setTime(String time){  this.time = time;  }

    public progMapEntity(){}

    public progMapEntity(String device, String name, String id, String time, String path) {
        this.device = device;
        this.name = name;
        this.id = id;
        this.time = time;
        this.path = path;
    }

    public progMapEntity(progMapEntity record){
        this.device = record.device;
        this.name = record.name;
        this.id = record.id;
        this.time = record.time;
        this.path = record.path;
    }
}
